<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // function User(name,age){
        //     this.name=name;
        //     this.age=age;
        // }    
        // User.prototype.showName=function(){
        //     alert(this.name)
        // }
        // User.prototype.height=180
        // var boy1=new User('ieasy',18);
        // var boy2=new User('ieasy',18);

        // alert(boy1.height == boy2.height)

        // function User(name,age){
        //     this.name=name;
        //     this.age=age;
        //     this.type='sss';
        //     this.show=function(){
        //         console.log('ddddd')
        //     }
        // }

        // var user1=new User('dd',18)
        // var user2=new User('dddd',19)
        // alert('names' in user1)
        // console.log(user1.hasOwnProperty("name"))
        // console.log(user1.hasOwnProperty("height"))

        // console.log(User.prototype.isPrototypeOf(user1))

        // console.log(user1.type == user2.type)

        class User{
            constructor(name,age){
                this.name=name;
                this.age=age;
            }

            showName(){
                alert(this.name)
            }
        }

        // var dd=new User('ieasy',26);

        // dd.showName()


        class vipUser extends User{
            constructor(name,age,level){
                super(name,age)
                this.level=level;
            }
            showLevel(){
                alert(this.name)
            }
        }

        var vip=new vipUser('ieeiei',12,12);

        vip.showLevel()


        /* 
            class xx{
                constructor(l,l){
                    this.l=l;
                    this.l=l;
                }
                fn(){

                }
            }

            class xx extends xx{
                constructor(l,l,dd){
                    super(l,l);
                    this.dd=ddd
                }

                fn(){
                    
                }
            }
         */

    </script>
</body>
</html>